package com.example.demo.Controller;

import com.example.demo.Service.HealthyService;
import com.example.demo.entity.Healthy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/heathy")
@RestController
public class HeathyController {
    @Autowired
    HealthyService healthyService;
    @GetMapping("/query")
    public List<Healthy> get(){
        return healthyService.list();
    }
}
